Initial commit.

Helper functions.