Moved to a more standard module structure, added tests.