Fixed Bugs and corrected File Encoding