Refactor: Replace malloc/free with std::vector
Refactor: Replace integral type with bool
Refactor: Replace integral type with bool
Refactor: Replace integral type with bool
Refactor: Replace integral type with bool
Refactor: Replace integral type with bool
Refactor: Replace integral type with bool