Minor refactorings, renamed some files, cleaned up, added some comments.