Update react-router and flux and refactor