update immediate TODO
move code from .h to .c (where it is not pointless)