Cleaning up Bug Reporting

-Moved some functionality into a library file. 
-Removed some unnecessary code
-Brought test coverage to 89.83%