Better custom js handling