Improved (comments, code) and tests