Bug fixes and trigonometry cleanup start.
Use Rectangle and Vector objects where appropriate.

Some bugs remain.