Reorganized files

moved code to code/ and .sex files to base directory