Significantly tighten up code for rake api tasks.
Per @adaburrows move the get_node get_group get_class methods to a shared helper file.
More cleanups to the node classes groups rake tasks.