small UI changes (fixes FF select bug); big internals rewrite, reduced code complexity