Done with project 3 (hopefully); added mode bit stuff and cleaned up other bugs and bad code