remove unused functions, clean up documentation