Cleaned up documentation to make usage clearer, added a more robust error message to aid in confusion when passing in the wrong type (related to issue #3).