fEMR makeover and bug fixes

Gives fEMR a makeover and fixes issues 277, 255, 189