added keyboard wheel control, code cleanup