removed dead code, refactored a bunch of static

member functions