initial code for flashlight

Initial code for the project. Compiles but not tested.