New functions - splitting up functionality.