Added pagination functions to heatmap and lexical scoping to controller.
Fixes #26.