Reorganized files. Added documntation.