Nearly there now, still some things hardcoded