Better CLI help and some structural optimizations