First draft of ranking implementation. Commandline interface is missing. Also added some things to the documentation