fixed bug with node func spec and the rest of the refactoring