Added some cleanups for cython compilation and some checks to allow cython performance options