Changes commandStack implementation to SplStack