Add helper functions for dealing with looping over object properties. Closes #40.