made several changes. components. fixes to kk's code.