refactored broker

trying to have a clear vision of the class job, and get rid of the ugly `F` on code climate.