The reson why the codes most likely look overly complicated is that we normally write rather generic code with lots of error checks. However, the UDFs are all well tested, thus one only needs to copy them and use them according to their headers.
_________________________
There are two types of vessels, submarines and targets.