This file and all of its functions are terrible.