May need a bit of testing, However I think I finshed it :)