A few more helper functions added.