mechanize processing of graphical orders to improve security

Introduced some mechanizing in the processing of graphical orders. It decreases the code size and improve security.