Fix some bugs in letp. Remove unused util code. Add more information to failures.