minor changes from mac install
refactored files to directory tree
refactored into single method