Move activity related func to different file for clarity