fixed most atrocious design problems