added basic error handling; completed docblocks
added example input file; moved todo into readme
fixed error handling