adding plugins and some tidying up