add makefile
extract update_entries()
extract validate_fetch()
reduce cyclomatic complexity