System functions created and bug fixes for can.c