added "generate FM" to menu & refactoring

DRY & extracted some methods and pulled them up into superclass