Fixed package error to make the npm package work
Added support for complex definitions such as charlatan