Revert changes
Add unit tests and fix bug