Cleaned up, checked comments and wrote demo function
Cleaned up, checked comments and added demo function.
Modified tests such that incorrect output is better logged.
Cleaned up
Cleaned up file
Finished all functionality