more code cleanup -- almost getting there