Added code coverage and test stuff
Got up to 100% code coverage and branch coverage.
Re-worked implementation to address edge cases

    * Also added some boundary cases to the outputs file.