PR to fix #24, #29 and #30

Sorry for the big changes on the ServiceProvider file, my IDE auto-formats code