clean up test code for browser