Cleaned up some indentation issues; added setup.py. Considering replacing use of mysqldb with pymysqldb, which is used elsewhere in the project. Comments are needed everywhere.