Huge Refactoring for decouple theme engine and UI