Major performance upgrade + bug fixes