Added query parameter
Added limit parameter
Removed global variable usage
Added parameter for title search
Factorized code
Ported code to Python 3
Added database class