Sync of last changes in PAL local svn

I merged changes into my fork.

Please check if anything seems wrong or not necessary.