Huge mistake in JS; was never rendering