altered Mini.java and refactored cfg.java into a Node class and Nodetype enum