Various JS and function names fixes