remove unnecessary spaces
add some types for request/response messages