Added activity completion support,

Small bugfixes.