Adding cst.h file + small changes everywhere