Finished re-write of unit tests. #51, #57, #58