refactor broker && modify app js