Closes #6. Specs and implementation