Update project layout and fix unit tests