restructed application structure