Cleaning up the mess in activity