Removed dynamic allocation from stacks.
Made stacks centrally and statically allocated.