js cleanup & better performance