improved class loading hierarchy