Abstracted things away to helper functions.