Implements basic functions.