Refactoring of manage.py

Change-Id: I82ef5bc2586e78cc8d0815e5e0db7048e19484f0
Merge "Refactoring of manage.py"