Move some functions to its appropriate module
Move some functions that process buffers to their appropriate module