Completed Bug Fixing and Final Code that was mailed on 23rg August 2014