Sorta working now, lots more to do though