Bugs and DB finall working