implemented RexPro protocol v1
code cleanup
replaced useless code