remove usage of version and db version globals