some js and small fixes