Docstrings, debug code, fixing graham scan

Docstrings included for all functions.
Now accepts 0 or 1 as an cmdline arg for disabling/enabling debugging
respectively.
Began work on a proper graham scan.