Refactor: Replace macros with enum
Refactor: Replace malloc/free with std::vector
Refactor: Fix spelling errors in comments
Refactor: Replace malloc with std::vector
Refactor: Replace malloc with std::vector
Refactor: Replace malloc formula work area with std::vector
Refactor: Delete dead code
Refactor: Delete dead code
Refactor: Separate assignment from switch
Refactor: Reformat while loops
Refactor: Reformat loop conditions and bodies on separate lines