Moving ml code around