rewrote MinkContext class with spin functions.