finished major refactor (Yay)