Abstract app functions into modules