Split stack into 2 files instead of 1

stack.c for implementation