Rewrote fract.c in C++
Added necessary header files for cross-file functions
Started rewriting factor.c in C++