Everything working + reduced openings of database connection