by mistermarco: #96 - handle multiple theming functions, code refactoring