Fixed buy bug & refactored client and firm models