Add unit tests, remove modify, fix SERIOUS basic bug