Added self test to configuration
Reformatted code based on PSR1/PSR2