Adding libqs preamble, types/funcs.
Adding implicit first arg processor param, main generation.