Cleaning up setter function that is a function - Theo's Typesafe Cult