Cleaned up a bit. Placed tests in subdirectory.