Some common code I use for my projects