Improved levels and difficulty curve; refactoring