Finished fixing up the economy functions.