AP comments and refactoring - full
Signed-off-by: Andrey Shamis <lolnik@gmail.com>

Change-Id: I9f251fa9eeb3fc4fcbffb5ae706921c74b90de8f