Code cleanup
Starting with substack