New features and bug fixes for SA

Closes #21