Old academic project, half baked, keep for reference only