Make the code cleaner and more readable in pf
Make the [] in pf work like an array (#1349)