Added ZBE_Cache and beacon detector. Plus other edits