Main

Updated comments as well as very minor function changes