add AttachEphemeralHandler function.
bump version number to 0.5.0.
Merge branch 'release/0.5.0' into develop