Updated docblocks/comments, cleaned up returns and removed unused variable.