staircase update

Some updates to staircase internals. Cleaner and faster. Also new API that is better (but default is the legacy API, so users won't notice this upgrade)