Moved connection to database inside objects
merge