Code cleanup. More should be done.