Adds normalize and fixes for javascript