Missing imports, some fixes, it actually works now.