Divide SampleController into SampleController and SampleApplication