just some minor refactors (pointers to references because i have done grate befohr)