cleanup and fix open in browser