Refactor Stackable

In progress work to fix: #377, #316 and #342

Also fixes: #389

Remaining tasks:

 - [ ] Fix hide/show stacks
 - [ ] write spec tests in jasmine for coloring cases
 - [ ] fix failing test cases
 - [ ] Coordinate with changes in #402