Fix CodeSniffer errors and warnings

Change-Id: I400be7efe100005af5616bcaf1614009c9f0efc4