Slight refactor to assignment 1 submission