reviewt branch: added comments and small style changes