Better browser detection

Also allows the script to be run from the command line
Made app with plaintext source