This is a mess, I need to clean it up later...