Some comments and function documentation added