Improved comments and docs