More test, reformat code to PSR-0