Bug corrections and improvements
Added the outputs