Add license and readme details. Rid of compile-time switches. Rid of lazy initialization of sensor. Minor code fixing.