cleanups
more cleanups
Half baked rewrite