Silenced warnings, fixed bad return, now compiles cleanly