Changes use of @var to @type
Adds where statements to Query