added more useful functions to stack, fixed some
memory leaks. Working on lexer :memo: