Updated files to include BSD license. Minor fixes to build with GCC 4.8