Application refactoring.

My refactoring.