Add unit tests and pass them

Refactor project layout (test => tests, move PHPUnit config to root)
Add unit tests for activators and fix failing code