Some bugs fixes and basic outline mode working