Refactor scaling code
Merge branch 'master' of https://github.com/BuddaT/LD31.git