Removed print statement
Restructured the stack commands
Small fixes and clean up