Performed some fixes as suggested in Sensio code analysis #108