MAJOR REFACTORING: Moving towards this being a real python package. Fixed up several problems with module imports and cyclic dependencies.
Moving constants; minor cleanup of commented out imports.