Sync main activity code with server side changes.