Unit tests
Unit tests added; minor bug fixes; this commit marks the stable release