Port to Linux
Performance improvements