added stack_is_empty() function and tests for it
fixed some errors
merged branch stack into restack