Fixed tfid calculation so it is independent of codes and jsut focuses on finding important words.
Added comments and cleaned up