General procedures and functions.