Added a bunch of stuff that probably barely works.