Minor changes to ClassDatabase

Added argument count check
Fixed the function name in assert
Fixed the arguments parameter for dbQuery