Add url normalize helper
Minor code refactoring
Update Makefile