Fixed Typo's and small architectural problem