introduce low-level command class to handle command serialization
move message parsing to command parser class