Only fetch structure entries that are first level or sub level that don't have a parent I have a Structure with my entries in. How can I hide the parent entries that contain children? I still want to show the parents children.

For example I want all the below entries bar "About" and "Services"

- Home
- About
    - Sub
    - Sub
    - Sub
- Stuff
- Services
    - Sub
    - Sub
    - Sub
- Things 


So, this is my code right now

{# Set parameters for prev/next elements list #}
{% set params = craft.entries.section('pages') %}

{# Get the prev/next elements #}
{% set prevEntry = entry.getPrev(params) %}
{% set nextEntry = entry.getNext(params) %}


Do I need to modify the params to remove the entries that are parents?
You can use the hasDescendants() method to filter out any parent entry with children. You have to use an ElementCriteriaModel with .getPrev() and .getNext().

{% set entries = craft.entries.section( 'pages' ) %}
{% set entryIds = [] %}

{% for entry in entries %}
  {% if not entry.hasDescendants() %}
    {% set entryIds = entryIds|merge( [entry.id] ) %}
  {% endif %}
{% endfor %}

{% set criteria = craft.entries.id( entryIds ) %}

{% set prevEntry = entry.getPrev( criteria ) %}
{% set nextEntry = entry.getNext( criteria ) %}


You will also need to add logic to get the first and last entry is next or previous is null.