Refactored AF classes, created base class with commonly shared functions and attributes.