Further break up monolithic gen temple string function