Refactored App class.