Database changes

some variable declaration changed + MediaScanner