refactored application skeleton