Remove redundancy from code for calculating events, themes, settings