I'd re-install the template and start over. You've made a mess of it. And, why do you have the entire site loading on the secure server?