Large reorganization before I start refactoring and working on this again