Moved non-static var from XML template to code