unused globals and $db object.
Signed-off-by:Thorsten Eurich <thorsten@eurich.de>