What are malpighian tubules?

Malphigian tubules are fine, unbranched yellow tubules that lies more or less in the haemocoel, which open into alimentary canal.
Function:
(a) They absorb nitrogenous waste products.
(b) They convert the nitrogenous waste products into uric acid which is excreted out