I recieve Null Refrence Exception when I use OOP programming

I am trying to organize my game with OOP , I have the Main class which is attached to the Player and call from inside it the Walk function, here is the the Main Class:

using UnityEngine;
using System.Collections;

public class Main : MonoBehaviour {
	
	public bool isDead;
	Walk walk = new Walk();
	
	// Use this for initialization
	void Start () {
		
		isDead = false;		
	}
	
	// Update is called once per frame
	void Update () {
		
			walk.Moving();
	}
}

and when the game runs I recieve Null Refrence Exception on that line and the code do not work:
moveDirection = transform.TransformDirection(Vector3.forward);

and here is all the code for the Walk Class which includes the Moving function:

using UnityEngine;
using System.Collections;

public class Walk : MonoBehaviour {
	
     Vector3 moveDirection;
	 CharacterController controller;
	 float walkSpeed;
	 float runSpeed;
	

	// Use this for initialization
	void Start () {
		
		moveDirection = Vector3.zero;
		walkSpeed = 2f;
		runSpeed =  5f;
	
	}
	
	// Update is called once per frame
	void Update () {
				
		controller = (CharacterController)transform.GetComponent (typeof(CharacterController));
		
		transform.Rotate (0,2 * Input.GetAxis("Mouse X"),0);


		Moving();
		
	}
	
	public void Moving()
	{
		
		
		if(Input.GetKey ("up"))
		{
			moveDirection = transform.TransformDirection(Vector3.forward);
			controller.Move (moveDirection * Time.deltaTime * walkSpeed );
			animation.CrossFade ("walk");
		}
		
		if(Input.GetKey (KeyCode.LeftShift) && Input.GetKey (KeyCode.UpArrow))
		{
			moveDirection = transform.TransformDirection (Vector3.forward);
			controller.Move (moveDirection * Time.deltaTime * runSpeed );
			animation.CrossFade ("run");
		}
		
		if(Input.GetKey ("down"))
		{
			moveDirection = -transform.TransformDirection(Vector3.forward);
			controller.Move (moveDirection * Time.deltaTime * walkSpeed );
			animation.CrossFade ("walk");
		}
	
	}
}

If your class is a inheriting from Monobehaviour you cant simply use new to create an instance and you should receive warning …
the script need to be attached to a gameobject

==EDIT==
You can either add the component to the same game object:

gameObject.AddComponent("Walk");

then when you want to call the functions you can:

gameObject.GetComponent("Walk").Moving();

other way of referencing the script is by declaring a variable of Type “Walk” to be more efficient. and reference it in the Start() function of you Main script.

But since you are calling moving inside the update function of Walk there is no point of calling this function again from your Main script.

Vector3 moveDirection = new Vector3();