refactored, moved machine learning stuff to ml subfolder