Improved comments and greatly improved functionality