Fixed filenames, cleaned up code, and removed errors