basic fixes, still broken.

commiting changes to script.js based on console.