More code cleanup and version bump to 1.2