Tidied up sprite class to not error out