End instruction logic and layout working