First version

Functions created and comments added