Initial Cleanup and new structure

first step for refactoring and a modern structure.