More unit tests and features