Rest of javascript, take 1