Merge pull request #300 from andlaus/fix_warnings

fix compiler warnings and rename CF to CompletionFactor