Refactor to fix sortables