Add support for connected sortables; more code cleanup