Major refactor, adding plugins