Add length info
Fix warnings