Split logical units into own files. Added mutex to entry
So that we can lock an entry, I added a sync mutex to get a reliable is processing or is complete return value. Also split the code into files based on logical blocks. Re-checked the example file included and updated.