Changed deprecated function
Added possibility to get query string form request uri
Improved database creation