Cleaned up comments, removed some unused code.