Complete core, add input handling