use Timer library for delayed actions, fix compile warnings