Added buttons and changed functionality