Bug fixing and button handlers are added.