Major changes/refactoring (VERY WIP)