Added history clear, TODO, cleanup