Various syntax refactoring with rendering and model queries