code cleanup, use OF_ROOT env variable