implemented the main url parse method. autoformmated some files