Improved inverse lines code in Sort-a-poetica post