Refactor the spare functionality