fix "cluster" option check
cleanup: comment typos, imports, exceptions and such
junit: use parameterized tests