implemented DB update
fixed a lot of bugs and implemented chaned sort order and improved layouts