Changed method of calling plugin methods, and added new hooks. Closes #10