Added unit tests. Unable to test all the code because Jasmine is unable to handle captured composed functions passed from within a closure. Working on a bug submission.