Adds some testing.
Makes code "DRY" and easier to maintain.
Updates documentation for version 2.0.0.