Ticket #132 - simplifying repeated code