balance magic numbers, put in some error handling
Merge branch 'master' of https://github.com/rrrhys/planes_javascript