Moved some SQL-queries to be temporary stored in variables, for debugginge
Fixed issue #75