check if running as root and verify uids
replace first_run with a status enum
replace SOCK_PATH with a const char *
refactor sourcing code