Added document ranking functionality and simple result output; need to clean up more and add documentation