Adding example using flatMap and manual transactions, fixing command complete parser to check if there is a value before trying to parse it