bug fixes
bug fixes
code cleanup