Final refactoring, all files should now meet standards