Added buttons functionality to index