Added specs and fixing errors