Added some support functions.