update database queries, fix a problem with Facebook tracking, update app window