refactor; minor changes