lots of cached data from horizon and moved more code in subtemplates