I am by no means good at this but I have given it a good go. This code is as is and was developed for use in my own project