Added push/pop methods, changed reduce to foldl and added a foldr version as well.