Friendly Name + DB connection update

Also updated the DB connection to use a function to modify it easier if needed.
Reason: sqlite has locking issues ( not multiuser ). It will now wait, 10 seconds, for lock to finish instead of giving a connection error when locked. User will have to visit settings page and save them again for site to function properly.