let users input title and txt instead of url, cleaned up code