Tidying up stuff and removing plugin system