Header and javadoc update
Migrate input processing to its own thread