Implementation of feature Request 1412 with Reduced Code duplication