Contains the general functions