Clena up of code based upun Analysis