Implemented operation stack
Code cleanup