refactored CaustkApplication to use CaustkFactory