Cleaned up code, comments, etc.