Minor refactor. Moving ground to a different package, adding comments.