Merge refactor and productionization changes into master