[PEP8] changes, code improvements, insert __version__ string

Change-Id: Icff281c4d659d40a527eeecac12de17afaef8201