Fix bug in perprof/main.py

Methods from class MUST have `self` as the first parameter.

Some changes in the class initialization.