Cleaning up implementation