Fixed the indentation problems
Changed the way the angle is computed