Fix
Major refactoring