Modernise and update sample projects

Change-Id: I8eb34abdffc293372deed772c65302af96518b7c