refactor theme engine for new design, remove deprecated features