Added a lot of functionality.