Changes in code, some functions have cancel, new structure, all code has comments