Added code to remove empty lines
Added code to remove whitespaces