Get basic wandering algorithm working