Replace scanf with custom parsing