Eliminated NodeState class and organized Controller Class