Fixed some function names and Added service restart code