upgraded jquery version. started using templates for cleaner code.