Started writing the manpages, fixed some issues with test programs