Fixed a lot of header errors, erased references to ui_files although not all of them and added a function for TreeView to add an skeleton after the end