Rename files, update identation, add empty checks