Move input functions and add an address

I thought they belong in input.c more than in osinterface. Also some minor changes with types and names and added an address.