Refactoring all classes(some debug info and other things were deleted). Creating of pages now working.