Working with some ugly code.