AMENDED AND RESTATED INVESTMENT AGREEMENT dated as of August 9, 2015 and amended and restated as of May 19, 2016