rename route => dispatch, Add initFromDirectory API