Updated to actually do everything.