cleanup code
replace static classes with simple oo