F/dbparser testing

This branch refactors the dbparser unit test program to make a bit more readable and also contains dbparser
refactors.
Could be the following if else statement in a separated function (e.g.: update_buckets)?