added comments
large update to pid system