Made plugin more universal