Cleaned up comments, did some reorganization, fixed a URL builind bug.