Cleaning up implementation.