Fix "No newline at end of file" issue, make code nicer