UPDATE: More unit tests. Many not implemented