Added ie support, many changes in class