major structure overhaul; corrected var and meth names