Improved the renderer, by adding a new field to query before rendering and a couple of base functions. Also re-wrote the lambda expressions used.