move facetbrowser code to own file