Implemented cost function, changed bidding behavior, maybe fixed bugs