Use SplStack, add sample script showing middleware layers