Closing database and fixing _validExpiration. Pending getProfile method