fixed compile errors
fixed strdup based memory leaks
removed ulockmgr usage - it didnt compile on my box caused by lulockmgr