Shortenings

I made the code a small bit shorter and legible by adding the quad() function.