Refactor per suggestions