fix title output
rename to index.js
improve title/heading handling