classes rework

no more static classes, no more global variables