Fixed bug with genStackPops, cleaned up formatting and output