Renamed query -> statement
Fixed database initialization in DynamicSelectTest + minor cleanup