added app state/settings and some minor bugs squashed...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>