Add test for multiple empty lines and improve? code