Added pop method, edited struct definition so that the current and next pointers can be reassigned properly