root lib directory

created lib directory in root folder to contain all shared files.
Modiphy JS code makes up the bulk of the files.

Also moved config file in the top level of this lib/ directory