issue #1: clean up code
issue #1: add options dialog