Delete unused code, add onPause and so on