Modified repairAngle
Forgot repairAngle return statement :D
Fixed compile errors and some cleanup