Tidy up things and minor sequence fixes.