factor out KI, implement KI communication

KI should be in its own class, the main activity should only tick() everything. also added notes for TODOs here and there, more to come.