FIX: Add tests and complete