added missing javadoc; fixed minor issues
removed dependency on global krun options; removed some dead code