This code is fucking sexy.