Simplify and cleanup syntax

This patch just cleans up the code a bit. Nothing special I think, but 10 lines saved. :scissors: