Themes editor and code reorganization