Code cleaning (docs, comments, remove unused functions, etc.)