Added majority of functionality except for settings page