code cleanup, added initial sensor code