Refactored the jadeHandler object to take the db when it is first initialized