Transfered checkInput logic and mapEditor logic into MapEditor class.