Finish FCTRL, Python version TLE'd so I rewrote in C