icon button fixes and refactoring. Fixes #37.