Added module sorting capability.