Reorganized code
Fixed links