Update: Simple clustering working. Awfully slow though.