Complete (1st draft)

Code believed to be complete.
I need to review comments and possibly refactor.