Refactor Callum's shit code