Tested, It workes. Made a few fixes.