moved definiton files to be generated in lib directory, and loading of javascript file to be optional