Moved log statements. Closes #30.
Removed comment. Closes #29.
Closed file descriptor. Closes #25.
Fixed logging bugs. Closes #24.
Removed/Modified old TODOs. Closes #22.
Fixes XSS issues. Closes #21.