WIP, still some things left to fix. No server side yet