This file contains ONLY FUNCTIONS. These functions are described in the comments.