Move generators from src to lib
Update generator to create pure-JS adaptors