fixed getComponentInDirection for fans, minor cleanup