BIG CHANGES...sorry about that.
Db db needs to be passed when you need to use db...
- Kelvin
Suggest any better solution.