Overal code cleanup