Clean up, use typed arrays