Writing specs and finishing lib