* Updated code, comments and tests