fixed issue with lazy route gen and added support for automatically
generating models.js