code cleanup: use classes, not instances