tl.js: cleaned up + detailed comments added