Several changes to fix "Warning: no new line at end of file"