added comments and other less visible changes