edit changes to limit resources
Fix pep8

Signed-off-by: Prasanna Santhanam <tsp@apache.org>