Minor bugfixes

inline functions need a lookthrough
interrupt cleanup

No function calls from interrupts. Now uses flags and calls are made
from main loop