updated lib+code cleanup