Refactor almost all code to a stable base 1.1.0.