Rebuild

almost total GUI rebuild and code optimalization