Fixed 404 errors and tweaked template conditional variables