refactoring and javadoc in MoveToFront