LS compatibility
minor code restyling
excludes NOW() from SQL-requests