Ugly huge commit, i know i shouldn't, but meh