Minor fixes and some JS