fix a bug with the next and previous methods of a content entry + make some methods less complex #codeclimate