Implement some new stuff

Should now compile - probably doesn't work though