Final commit, bit messy but oh well