clean code for js