Cleaned up and commented the mirror descent with basis adaptation code a little, should be slightly easier to follow now. slightly.