add class tests, rework directive argument parsing