Clarified code with space and comments, added NULL test for stack realloc
Added a few more comments and TODOs, added return_status