cap support

Suggestions and critics are welcome :)
Please use:

    strcmp() == 0

We are not very consistent with this in the rest of the code though.