make the code psr-1/2 compilance
added basic doc comments
more doc comments