Cleaning up memory leaks and working through some of the PTE manipulation