Make use of undo() function in factory method, made customizing placement directions possible.