Fixed a bunch of typos, some static keywords and phpdocs