Better exception message
Started adding phpunit tests