major refactoring, touched just about everything
the internet stinks here