not so minor update

improved file reading and more