Capsule attributes are accessed via methods. Other minor changes.
Added capsule token challenge on receipt, moved some independent functions to utilities lib.