Added a lot of stuff. I should really clean this up...