Use C-style comments; Use qspIsEmpty for qspNullString checks
Don't use local var for the FOR loop
Some tweaks
Improve loops syntax