Add several button listeners. Please read the comment in main.js