handle app updates better, add documentation to script.js