MLN example and code. To be cleaned up.