Refactoring and first step to record existing positions.