Handle upstream breaking changes

Also some organisational changes and some verification
methods.