Added custom memory support for pwp_conn_new
added header guards