Moved commonly used methods in one place
modified method to refresh DB object