Trim config and set app name