creates apples model and controller