made valid_move method DRYer and moved it to the piece class
updated converter
additional refactoring