Fixed documentation and removed useless code