cleanup some js stuff