added new function dll_add_before, cleaned up code

added new function dll_add_before
added assert statements to the iterator functions
fixed bug in dll_contains function
minor improvements in the code
cleaned up the code