Added implementation and comments...

Added view handlers implementation and function descriptions for most
main functions