Wrote detection and main controller
Added shitloads of stuff. And some databaseconfig, so I deleted that from the git indexing stuff