Initial commit

Import code from Guchi.c found on flashdrive.