Closing database.
Tweaking for mobile.