added points for debugging projection accuracy, reformatted some code