Fixed a bug and updated the CIS functions to work like the other functions
Began a major rewrite, currently incomplete