Added PHPDoc block and added additional comments in code