Ready for tests. Cleaned up unused files.

Pending tests, all required functions are complete.