Add some refactorings and inline-mode skelton (not implemented yet).