add click event, remove button
TODO: refactoring (including removal of unneeded pointers) and normal resize event