Some cleenup is needed, but all the functionality is present.