cleanup activity loop using separate initializers and complete functions