added copy anim curve editor script
cleanup code
porting more js to cs