Initial removal of usless funtion checksof non needed functions and end ifs
General overhall of theme structure and updated gadget build tool