added button groups and improved some interaction event handlers