Bug fixes + speed improvements