Completed porting of MALA and various other improvements