Refactored a number of classes to make the system cleaner and neater.
Some more refactoring of the scheduling policy and node update rules.
More improvements.