More updates and refactoring

This is close to working but I need to test and add tests.
Added init files and renamed some files