Added some extension methods to aid readability