minor edits
fixed cross browser issues
cleaning up demo page
moving non-essential fns into extension.js