dependencies and iife for line.js
minor refactoring and bugfixes