Add missing return statements
Fix up source so that we can compile with clang