Refactor theme and introduce registration