Working to move code to celle and clean the code up to try and make it understandable.