Fix some bugs and create manager
Split yinsh.js file into multiple files