Version 0.3.1 beta - Error Check in Parser

Added error checking in the parser function.  Also changes all
functions to static.  Error checking remains untested and without
complete comments.