Added longopts support to remaining functions
Updated example documentation