Add initial tests and implementation