Cleaned up directory and code, added some comments