Lots of improvements for I/O of cns tbl file and grouping of restraints.

Signed-off-by: Justin Lecher <jlec@gentoo.org>