Converted internal functionality to Signals and Slots
This not only made it work more effeciently and made it look nicer, it also solved the weird problem we were having about end-of-files breaking the application/opening new files on top of the current breaking the application. It all works now, just have to convert some leftover functions--first I need to know why some of them do what they do because it seems they were changed without me knowing.