Sync with BMKEG repo

Here is the first port of the source code from our local svn server
onto GitHub (svn commit #5673)