Update public activities and clean up some code.