Finished changing use of reflection to fit best practise