clean up lpel interfaces & add impl of strnstr