I feel that we should make assign_version a member of the main (shard) class and refactor the main logic part of SOAP and REST in one place.