Remove unused variables and globals

bump to version 3.11 20130401

Also remove superfluous newlines, update some formatting and simplify two
if() statements.

Change-Id: Ie23d9cb0445bb113fddd7223af7858be97bf5890