Add options support and PhpUnit tests