Almost finished it, still some errors