Change: beginning refactoring for beta
Merge branch 'master' into beta
Change: move some functionality up to public, will merge with other functions later