Improves existing functions, add new functions and comments.