Minor optimizations using inline and static. Cleaned code in led sysmod.