Small improvements, and added documentation.
Found more necessary documentation.
Refactored to make use of form module.