further code cleanup for adamv