Cherry picked ptb's code style changes. Fixed demos lib path etc.