CLC-4013 - Refactor for memory conservation

https://jira.ets.berkeley.edu/jira/browse/CLC-4013