Include k in conversion and add restriction generation.
Added commandline logic; fixed bug mixing up point dim and count.
Fix formatting.