modularizing js extensions