introduced BufferProvider for different filetypes
minor refactorings