Speed improvements, tried to fix rendering issue