code fixes, style changes