Fix bugs. Add minor improvements. Bump version to 1.2.1