Improved comments and code documentation