Merged some minor things from source2013 and did some minor comment changes.
Updated boost library to 1.54.0
Removed several unused functions.