Added a LOT of stuff. Fixed a LOT of bugs. There's still some, test it with the application and a simple text file and look at the exceptions.