Moving all the code over from my personal repo

there are probably better ways to do this...