Module refactoring and renaming. Added ability to run as standalone
tool.