better readme, link to the paper
fixed few things
splited functions over two files