Json generation now working, pagespec matching too, solved many issues.