gerneral code clean up