lib: remove unused variables and functions
buffer: remove unused parameters
cluster: variable is not global