work on GUI window and database; cleanup