Fixed cargo setup

I have moved some files around to make it usable as a library in other programs with cargo.