Moved methods to helper file and readded refs