added comments and small fixes