Added a bunch of functionality