style fixes and new import for activity/idle detection