updated README; fixed action hooking; moved plugin definition to its own file