Enhanced some code
Input fixed with some merge conflicts