Type checking and redundancy removed
typos and test now passes
Merge pull request #3 from danmaclean/master

Type checking and redundancy removed