I fixed the issue with the code above not compiling, was an oversight on my part.