Fixes server and adds code for shaking