Documentation + various bugs + improvements to stack processing