Fixed Stack API (Closes #5), and cascades the fix for the files that use it