Cleaning up some more stuff, and save the pattern used