Fixed some syntax errors, used Ci when it was available