Refactor capsule code and add job for storing just the membership number