RT_CAN code refactored and commented