Adding libraries support and a dpm() like wrapper function