Minor refactor, updated comments.