Added structure for input handling and updated docs