Bug fix.
Implementing Dao's
Some minor changes