Refact some application helper methods