A simple stack implementation using linked lists