Move third party library location
Refactor to remove code complexity according to PHPDepend and code formatting