Cleaned up pattern simplifier and operator code to fix loading compiled file.