Fixed some javascript issues, and added the copys bits.