Consolidate environment.rb function to search lib\ folder.
Merge branch 'cleanup'