move external dependencies to js/lib/third-party; refactor affected files to pass PSR-2; replace deprecated eregi() with preg_replace()
refactor lib/ according to PSR-2 EXCEPT Adb class refactorings
Refactor Adb class.
regression fixes