Things finally seem to be working, I just need to be more careful about messing with the templates.