Optimize activity and fragments