minor changes, code cleanup