restructured api code into more OOP-based, also removed FBM-specific code
removed
restored settings