More basic refactoring, time to get serious now