Refactoring continues. Working towards a point where interactive mode
will be optional
Moved some extra stuff.