Seperated some of the subfunctions allowing for access in custom plotting scripts