start refactoring input layer into a nice interface structure
fixup examples