Moved functions to include file"