Adding some things I needed

Please don't merge yet, this is just a request for comments. Some things are broken(see my notes).

I got it working perfectly with my other code though, it looks much neater than before too!