Slightly less bad implementation of this stuff that I am pushing in case I want to work on it after work because I have had a better idea.