Restructured project.
Added some tests.