rearranging directories, minor bug fixes