Added a wrapper for each method action to initialize fields of the class that the method belongs to.