Pb$_9$Cu(PO4)$_6$(OH)$_2$: Phonon bands, Localized Flat Band Magnetism, Models, and Chemical Analysis