[codereview refs#105] Implemented dan's suggestions.