Add comments and slight refactor