Code Cleanup and Adding PhpDoc

Signed-off-by: Paras Sood <psood@deloitte.com>