Recover from cloud9 IDE crash

Cleaned up the comments and headers and added code that c9 lost while I
was developing in their IDE.