Added MySQL DB and user permissions, cleaned up, and added comments.