Fixed some errors and added some actual functionality.
Got some basic document reading functionality working.