The code is currently a mess.