refactor base templates, fix jquery reference.

plz no borrar aun :D