Deleted code rebased from Github.