Removed unused variable.
PEP8 cleanup.
Fixed missing kwarg in calls to get_next/previous.
Added basic test of get_next/previous.