added themeroot support to theme-editor

#399
#399 margin cleanup
cleanup styles, fix xml empty checks
comments, cleanup