Commented code. Fixed some js stupidity.