Clean up and new files

Cleaned out some unused code, added logout, and made the code just a
tiny bit nicer to look at... I think...