Various changes

Added unit test;
Added CreateEnititesCommand;
Refactored config.php to prevent breaking of old code