Apply some of method extraction.
(There are some methods that are malfunctioning after extracting,
working on it)
there's some inconsistency about the mode variable. fix that!