Added lots of functionality