cleanup app

fix a few bugs and clean up the app.
remain on pre-released version 1.0