Add readOctetStringAP
Lint source and refactor