Functions created

1. Programmed the necessary functions
2. Added comments on how to use and what they do
3. Formatted the comments