Updates for latest nightly

This code will need some significant refactoring