Revert "Fix build."

This reverts commit ce5797128c129f49fd4f2cd8e51feafeab68f067.
Revert "Remove useless/repetitive code"

This reverts commit bf996a1af40b724b98f62524c8ffca66351e3ee2.