usage error printed before other errors
improved tests a lot, fixed a few compiler warnings resulting from macro code