Fixed some code, still working on Error