Fixed some bugs related to module imports
Renamed 'test' directory to 'tests'