Consolidate code in master

@rizar Once the sequence generator code is merged, shall we merge this back into `master`? The tests are passing and I think we have the same functionality as master did before we started on this branch.