Added new lines to the output from the template code
Fixed the new line issue
Added tests and fixed the empty lime emit issues