Improvements to code style and project structure