Restructure modules, move tests to a separate directory.
Switch the test script to using nose for test discovery.