code cleanup
consolidate callbacks in eachIf and eachExcept
move server code into src directory