lots of CS fixes and phpDocs completed