Working 'add' functionality and a bunch of other stuff.