A few helper methods.