refactory source and browser tab coding.