update message -> command architecture and review some bug