Changed int to ctf_bool
Adapted the properties to new typedefs
Reorganized the order of functions and updated the code to use newer helper functions