Static libraries + bug fixes