Clean up Javascript, update to version 1.0