"now deals with factors, so factor attributes are discoverable. Also moved the flagb stuff into prettyfunctionprint so it's more modular"