Refactor code in preparation for pre-rolled metrics support
Unit tests changes
Integration tests changes
Rename variables as per PR comments
Merge pull request #89 from lakshmi-kannan/bf_refactor_for_various_rollups

WIP: Refactor code in preparation for pre-rolled metrics support