Some utility methods.