Fixed some bugs and got rid of all the headers