Major refactoring in main program. Added interactive shell option to main class.