A lot of work done on a base theme, plus some minor refactoring