Some code refactoring and reorganization
More cosmetic changes - most specifically removing some hard coded paths