YAY REFACTOR YAY.