Refactoring the Input Processor and added map instead of HashMap For Output Format