General overhall of theme structure and updated gadget build tool